package cn.mldn.mldncloud.consumer.controller;

import cn.mldn.mldncloud.service.IRidersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController                                // 为方便起见使用Restful风格展示
public class RidersController {

    @Autowired
    private IRidersService ridersService;            // 注入远程业务接口对象

    @GetMapping("/consumer/riders/list")
    public Object listRidersRest() {
    	Object obj = this.ridersService.list();
        return obj      ;  // 调用Restful业务方法
    }

    @GetMapping("/consumer/riders/get")
    public Object getRidersRest(long ridersId) {
        return this.ridersService.get(ridersId);    // 调用Restful业务方法
    }
  
}
